<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>异步函数-3</title>
</head>

<body>
    <!-- 如果 Promise 有一个正常的返回值，await 语句也会返回它： -->
    <script>
        async function asyncFunc() {
            let value = await new Promise(
                function (resolve, reject) {
                    resolve("Return value");
                }
            );
            console.log(value);
        }
        asyncFunc();
    </script>
</body>

</html>